-- GENERATED SPELL FOR [Major Yeggeth] --


function spell0_15386(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15386', 593, 1)
end

function spell1_15386(pUnit, Event) --@Shield of Rajaxx,n/a--
pUnit:FullCastSpellOnTarget(25282,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15386', 6264, 1)
end

function spell2_15386(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(24317,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15386', 20350, 1)
end

function Sorts_15386(pUnit, Event)
local choix_sorts_15386 = math.random(0, 2)
if choix_sorts_15386 == 0 then
pUnit:RegisterEvent('spell0_15386', 1, 1)
end
if choix_sorts_15386 == 1 then
pUnit:RegisterEvent('spell1_15386', 1, 1)
end
if choix_sorts_15386 == 2 then
pUnit:RegisterEvent('spell2_15386', 1, 1)
end
end

function mob15386_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15386', math.random(1500, 3000), 1)
end

function mob15386_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15386_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15386_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15386, 1, 'mob15386_Action')
RegisterUnitEvent(15386, 2, 'mob15386_Leave')
RegisterUnitEvent(15386, 3, 'mob15386_Kill')
RegisterUnitEvent(15386, 4, 'mob15386_Die')
